import React, { memo, useEffect, useState } from 'react'
import ProjectStatus from '../../components/projectStatus'
import { StarOutlined } from '@ant-design/icons'
import styles from './index.module.scss'
const card = memo((props) => {
  const { data } = props
  console.log(data);
  return (
    <div className={styles.root}>
      {
        data && data.map(item => {
          return <div key={item.guid} className='content'>
            <div className='avatar'>
              <span />
            </div>
            <div className='text'>
              <h3>{item.prjName}  <span className='status'><ProjectStatus value={item.projectStatus} /></span> </h3>
              <h5>项目经理:{item.prjManager}</h5>
              <h5>立项日期:{item.prjStartDate}</h5>
              {item.projectStatus === 'processing' && <h5>
                任务:<span>{item.taskCount}</span>完成:<span>{item.taskDoneCount}</span>
                进行: <span>{item.taskDoingCount}</span>
                <span className='star'><StarOutlined></StarOutlined></span>
              </h5>}

            </div>
          </div>
        })
      }


    </div>
  )
})

export default card